package com.sf.fy.uav.rest;

import com.sf.fy.uav.common.request.operate.PromotionRecordsAddRequest;
import com.sf.fy.uav.common.request.operate.SysActivityRequest;
import com.sf.fy.uav.common.request.operate.SysPromotionRecordsRequest;
import com.sf.fy.uav.common.response.operational.SysActivityResponse;
import com.sf.fy.uav.common.response.operational.SysPromotionRecordsResponse;
import com.sf.fy.uav.service.IPromotionRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * 推广记录表 前端控制器
 * </p>
 *
 * @author LTQ
 * @since 2023-08-18
 */
@Controller
@RequestMapping("/sys/promotion-records")
public class PromotionRecordsRest {
    @Autowired
    private IPromotionRecordsService iPromotionRecordsService;

    public void addPromotionRecord(PromotionRecordsAddRequest promotionRecordsAddRequest) {

    }

    public Long getTotal(@RequestParam(required = false) String payerPhoneNumber, @RequestParam(required = false) String promotionPhoneNumber,
                         @RequestParam(required = false) String tcWaybillNo, @RequestParam(required = false) String activityId) {
        return iPromotionRecordsService.getTotal(payerPhoneNumber, promotionPhoneNumber, tcWaybillNo, activityId);
    }

    public List<SysPromotionRecordsResponse> getPromotionRecords(SysPromotionRecordsRequest sysPromotionRecordsRequest) {
        return iPromotionRecordsService.getPromotionRecords(sysPromotionRecordsRequest);
    }
}
